using Vin.Tool.Attributes;

namespace Vin.Extension.Framework.Sms.Model;

[Option("VinSms:Code")]
public class CodeModel
{
    public string Title { get; set; } = "";
    
    public string Content { get; set; } = "验证码：{Code}，用户系统登录验证，{Expire}分钟内有效，切勿泄露给他人。";

    public int Expire { get; set; } = 5;
    
    public string MaxCacheKey { get; set; } = "sms:max:";
    
    /// <summary>
    /// 1分钟内最多发送次数
    /// </summary>
    public int MaxCount { get; set; } = 3;
    
    /// <summary>
    /// 最大过期时间
    /// </summary>
    public int MaxExpire { get; set; } = 1;
}

[Option("VinSms")]
public class VinSmsConfig
{
    /// <summary>
    /// 验证码配置
    /// </summary>
    public CodeModel Code { get; set; } = new();
}